Salesforce UX API
TMF654- listBucket towards Matrixx V2 - PR
This use case is intended to provide group discount and subscriber Estimate Recurring Charge from Matrixx System.
URL
https://[localhost]:[port]/sfdc-ux/v2/{businessId}/PR/{businessId}/bucket
url Param
name | type | description | required |
---|---|---|---|
businessId | string | 2 letter ISO 3166 country code (TT, BB, JM, PA, etc.) identifying the business unit. | Y |
Header
name | type | description | required |
---|---|---|---|
client_id | string | The client_id identifying the channel. | Y |
client_secret | string | Password associated with the client_id. | Y |
X-Correlation-ID | string | Identifier that correlates HTTP request between a client and server. Any identification model (UUDI, checksum, etc.) can be used, as long as it is a unique value to differentiate a transaction. | Y |
Query Param
name | type | description | required |
---|---|---|---|
logicalResource.id | number | MSISDN number | Y* |
partyAccount.id | number | subscription Id | Y* |
Note - Either 'logicalResource.id' or 'partyAccount.id' mandatory.
cURL request
curl --location 'https://nonprod.esb.cloud.lla.com/dev/sfdc-ux/v2/PR/bucket?partyAccount.id=3172024-3172024' \
--header 'X-Correlation-Id: 644e1dd7-2a7f-18fb-b8ed-ed78c3F92c2b' \
--header 'client_id: 784c9a6dd7ae49768816cab57fcf1fa1' \
--header 'client_secret: 187b259EB77441babbF611d2646C670d'
Possible response success
This section defines all the possible data structures received by the client and that must be considered satisfactory at the time of responding to the method.
[ 200 ]
OK - GET request processed successfully, response body contains an entity corresponding to the requested resource.
Response for ExternalId (subscriptionId)
[
{
"id": "1",
"name": "Prepaid Balance",
"@type": "MainBalance",
"@baseType": "Bucket",
"description": "United States dollar",
"usageType": "monetary",
"isShared": false,
"remainingValue": {
"amount": 0.0,
"units": "USD"
},
"validFor": {
"startDateTime": "2024-02-21T08:41:02.000000-07:00",
"endDateTime": "65535-12-31T23:59:59.999999Z"
},
"partyAccount": {
"id": "S-103",
"@type": "SubscriptionRef"
},
"product": [
{
"id": "94",
"name": "Prepaid_Template_Shared",
"@type": "CatalogRef"
}
],
"taxItem": [
{
"taxAmount": {
"unit": "USD",
"value": 3.15
},
"taxCategory": "STATE SALES TAX",
"@type": "TaxItem"
},
{
"taxAmount": {
"unit": "USD",
"value": 0.3
},
"taxCategory": "CITY SALES TAX",
"@type": "TaxItem"
},
{
"taxAmount": {
"unit": "USD",
"value": 0.5
},
"taxCategory": "PR 911 SERVICE CHARGE",
"@type": "TaxItem"
},
{
"taxAmount": {
"unit": "USD",
"value": 0.0
},
"taxCategory": "FEDERAL COST RECOVERY FEE",
"@type": "TaxItem"
},
{
"taxAmount": {
"unit": "USD",
"value": 0.0
},
"taxCategory": "PUERTO RICO REGULATORY FEE",
"@type": "TaxItem"
},
{
"taxAmount": {
"unit": "USD",
"value": 0.27
},
"taxCategory": "PR UNIVERSAL SERVICE FUND",
"@type": "TaxItem"
},
{
"taxAmount": {
"unit": "USD",
"value": 0.45
},
"taxCategory": "FEDERAL UNIVERSAL SERVICE FUND",
"@type": "TaxItem"
},
{
"taxAmount": {
"unit": "USD",
"value": 0.0
},
"taxCategory": "FEDERAL COST RECOVERY CHARGE",
"@type": "TaxItem"
}
],
"impactedAmount": {
"amount": 33.5,
"units": "USD"
}
},
{
"id": "7",
"name": "Included MMS - Prepaid",
"@type": "MMS",
"@baseType": "Bucket",
"description": "Picture",
"usageType": "other",
"isShared": false,
"remainingValue": {
"amount": 0.0,
"units": "MMS"
},
"validFor": {
"startDateTime": "2024-03-22T00:00:00.000000-06:00",
"endDateTime": "2024-04-21T00:00:00.000000-06:00"
},
"partyAccount": {
"id": "S-103",
"@type": "SubscriptionRef"
},
"product": [
{
"id": "72",
"name": "Prepaid_Template_Shared",
"@type": "CatalogRef"
}
]
},
{
"id": "7",
"name": "Included Minutes - Prepaid",
"@baseType": "Bucket",
"@type": "Voice",
"description": "Voice",
"usageType": "voice",
"isShared": false,
"remainingValue": {
"amount": 0.0,
"units": "minutes"
},
"validFor": {
"startDateTime": "2024-03-22T00:00:00.000000-06:00",
"endDateTime": "2024-04-21T00:00:00.000000-06:00"
},
"partyAccount": {
"id": "S-103",
"@type": "SubscriptionRef"
},
"product": [
{
"id": "94",
"name": "Prepaid_Template_Shared",
"@type": "CatalogRef"
}
]
},
{
"id": "9",
"name": "Included SMS - Prepaid",
"@type": "SMS",
"@baseType": "Bucket",
"description": "Text",
"usageType": "sms",
"isShared": false,
"remainingValue": {
"amount": 0.0,
"units": "SMS"
},
"validFor": {
"startDateTime": "2024-03-22T00:00:00.000000-06:00",
"endDateTime": "2024-04-21T00:00:00.000000-06:00"
},
"partyAccount": {
"id": "S-103",
"@type": "SubscriptionRef"
},
"product": [
{
"id": "94",
"name": "Prepaid_Template_Shared",
"@type": "CatalogRef"
}
]
},
{
"id": "6",
"name": "Flag - Unlimited Hotspot usage",
"@type": "Flag - Unlimited Hotspot usage",
"@baseType": "Bucket",
"description": "Flag",
"usageType": "other",
"isShared": false,
"remainingValue": {
"amount": 0.0,
"units": "none"
},
"validFor": {
"startDateTime": "2024-02-21T08:41:56.000000-07:00",
"endDateTime": "65535-12-31T23:59:59.999999Z"
},
"partyAccount": {
"id": "S-103",
"@type": "SubscriptionRef"
},
"product": [
{
"id": "94",
"name": "Prepaid_Template_Shared",
"@type": "CatalogRef"
}
]
},
{
"id": "5",
"name": "Flag - Unlimited Internet usage",
"@type": "Flag - Unlimited Internet usage",
"@baseType": "Bucket",
"description": "Flag",
"usageType": "other",
"isShared": false,
"remainingValue": {
"amount": 0.0,
"units": "none"
},
"validFor": {
"startDateTime": "2024-02-21T08:41:56.000000-07:00",
"endDateTime": "65535-12-31T23:59:59.999999Z"
},
"partyAccount": {
"id": "S-103",
"@type": "SubscriptionRef"
},
"product": [
{
"id": "94",
"name": "Prepaid_Template_Shared",
"@type": "CatalogRef"
}
]
},
{
"id": "11",
"name": "HotSpot Data - Prepaid",
"@type": "Data",
"@baseType": "Bucket",
"description": "Data",
"usageType": "data",
"isShared": false,
"remainingValue": {
"amount": 0.0,
"units": "mbytes"
},
"validFor": {
"startDateTime": "2024-03-22T00:00:00.000000-06:00",
"endDateTime": "2024-04-21T00:00:00.000000-06:00"
},
"partyAccount": {
"id": "S-103",
"@type": "SubscriptionRef"
},
"product": [
{
"id": "94",
"name": "Prepaid_Template_Shared",
"@type": "CatalogRef"
}
]
},
{
"id": "12",
"name": "Included Data - Prepaid",
"@type": "Data",
"@baseType": "Bucket",
"description": "Data",
"usageType": "data",
"isShared": false,
"remainingValue": {
"amount": 0.0,
"units": "mbytes"
},
"validFor": {
"startDateTime": "2024-03-22T00:00:00.000000-06:00",
"endDateTime": "2024-04-21T00:00:00.000000-06:00"
},
"partyAccount": {
"id": "S-103",
"@type": "SubscriptionRef"
},
"product": [
{
"id": "94",
"name": "Prepaid_Template_Shared",
"@type": "CatalogRef"
}
]
},
{
"id": "3",
"name": "Prepaid Group Discount",
"@type": "Discount",
"usageType": "monetary",
"impactedAmount": {
"amount": -5,
"units": "USD"
}
}
]
Response for MSISDN
[
{
"id": "6",
"name": "Prepaid Balance",
"@type": "MainBalance",
"@baseType": "Bucket",
"description": "United States dollar",
"usageType": "monetory",
"isShared": false,
"remainingValue": {
"amount": -9.25,
"units": "USD"
},
"validFor": {
"startDateTime": "2024-12-09T06:47:57.000000-04:00",
"endDateTime": "65535-12-31T23:59:59.999999Z"
},
"partyAccount": {
"id": "S-09122024",
"@type": "SubscriptionRef"
},
"logicalResource": [
{
"name": "AccessNumber",
"value": "09122024",
"@type": "MSISDN"
}
],
"product": [
{
"id": "94",
"name": "Prepaid_Template_Shared",
"@type": "CatalogRef"
}
],
"taxItem": [
{
"taxAmount": {
"unit": "USD",
"value": 0.5
},
"taxCategory": "PR 911 SERVICE CHARGE",
"@type": "TaxItem"
},
{
"taxAmount": {
"unit": "USD",
"value": 0
},
"taxCategory": "FEDERAL COST RECOVERY FEE",
"@type": "TaxItem"
},
{
"taxAmount": {
"unit": "USD",
"value": -0.08
},
"taxCategory": "PR UNIVERSAL SERVICE FUND",
"@type": "TaxItem"
},
{
"taxAmount": {
"unit": "USD",
"value": 0
},
"taxCategory": "PUERTO RICO REGULATORY FEE",
"@type": "TaxItem"
},
{
"taxAmount": {
"unit": "USD",
"value": -0.14
},
"taxCategory": "FEDERAL UNIVERSAL SERVICE FUND",
"@type": "TaxItem"
},
{
"taxAmount": {
"unit": "USD",
"value": 0
},
"taxCategory": "FEDERAL COST RECOVERY CHARGE",
"@type": "TaxItem"
}
],
"impactedAmount": {
"amount": -9.25,
"units": "USD"
}
},
{
"id": "5",
"name": "Included MMS - Prepaid",
"@type": "MMS",
"@baseType": "Bucket",
"description": "Picture",
"usageType": "other",
"isShared": false,
"remainingValue": {
"amount": 0,
"units": "mms"
},
"validFor": {
"startDateTime": "2025-01-08T00:00:00.000000-04:00",
"endDateTime": "2025-02-07T00:00:00.000000-04:00"
},
"partyAccount": {
"id": "S-09122024",
"@type": "SubscriptionRef"
},
"logicalResource": [
{
"name": "AccessNumber",
"value": "09122024",
"@type": "MSISDN"
}
],
"product": [
{
"id": "94",
"name": "Prepaid_Template_Shared",
"@type": "CatalogRef"
}
]
},
{
"id": "14",
"name": "Included Minutes - Prepaid",
"@type": "Voice",
"@baseType": "Bucket",
"description": "Voice",
"usageType": "voice",
"isShared": false,
"remainingValue": {
"amount": 0,
"units": "minutes"
},
"validFor": {
"startDateTime": "2025-01-08T00:00:00.000000-04:00",
"endDateTime": "2025-02-07T00:00:00.000000-04:00"
},
"partyAccount": {
"id": "S-09122024",
"@type": "SubscriptionRef"
},
"logicalResource": [
{
"name": "AccessNumber",
"value": "09122024",
"@type": "MSISDN"
}
],
"product": [
{
"id": "94",
"name": "Prepaid_Template_Shared",
"@type": "CatalogRef"
}
]
},
{
"id": "8",
"name": "Included SMS - Prepaid",
"@type": "SMS",
"@baseType": "Bucket",
"description": "Text",
"usageType": "sms",
"isShared": false,
"remainingValue": {
"amount": 0,
"units": "sms"
},
"validFor": {
"startDateTime": "2025-01-08T00:00:00.000000-04:00",
"endDateTime": "2025-02-07T00:00:00.000000-04:00"
},
"partyAccount": {
"id": "S-09122024",
"@type": "SubscriptionRef"
},
"logicalResource": [
{
"name": "AccessNumber",
"value": "09122024",
"@type": "MSISDN"
}
],
"product": [
{
"id": "94",
"name": "Prepaid_Template_Shared",
"@type": "CatalogRef"
}
]
},
{
"id": "4",
"name": "Flag - Unlimited Hotspot usage",
"@type": "Flag - Unlimited Hotspot usage",
"@baseType": "Bucket",
"description": "Flag",
"usageType": "other",
"isShared": false,
"remainingValue": {
"amount": 0,
"units": "none"
},
"validFor": {
"startDateTime": "2024-12-09T06:47:57.000000-04:00",
"endDateTime": "65535-12-31T23:59:59.999999Z"
},
"partyAccount": {
"id": "S-09122024",
"@type": "SubscriptionRef"
},
"logicalResource": [
{
"name": "AccessNumber",
"value": "09122024",
"@type": "MSISDN"
}
],
"product": [
{
"id": "94",
"name": "Prepaid_Template_Shared",
"@type": "CatalogRef"
}
]
},
{
"id": "3",
"name": "Flag - Unlimited Internet usage",
"@type": "Flag - Unlimited Internet usage",
"@baseType": "Bucket",
"description": "Flag",
"usageType": "other",
"isShared": false,
"remainingValue": {
"amount": 0,
"units": "none"
},
"validFor": {
"startDateTime": "2024-12-09T06:47:57.000000-04:00",
"endDateTime": "65535-12-31T23:59:59.999999Z"
},
"partyAccount": {
"id": "S-09122024",
"@type": "SubscriptionRef"
},
"logicalResource": [
{
"name": "AccessNumber",
"value": "09122024",
"@type": "MSISDN"
}
],
"product": [
{
"id": "94",
"name": "Prepaid_Template_Shared",
"@type": "CatalogRef"
}
]
},
{
"id": "10",
"name": "HotSpot Data - Prepaid",
"@type": "Data",
"@baseType": "Bucket",
"description": "Data",
"usageType": "data",
"isShared": false,
"remainingValue": {
"amount": 0,
"units": "mbytes"
},
"validFor": {
"startDateTime": "2025-01-08T00:00:00.000000-04:00",
"endDateTime": "2025-02-07T00:00:00.000000-04:00"
},
"partyAccount": {
"id": "S-09122024",
"@type": "SubscriptionRef"
},
"logicalResource": [
{
"name": "AccessNumber",
"value": "09122024",
"@type": "MSISDN"
}
],
"product": [
{
"id": "94",
"name": "Prepaid_Template_Shared",
"@type": "CatalogRef"
}
]
},
{
"id": "9",
"name": "Included Data - Prepaid",
"@type": "Data",
"@baseType": "Bucket",
"description": "Data",
"usageType": "data",
"isShared": false,
"remainingValue": {
"amount": 0,
"units": "mbytes"
},
"validFor": {
"startDateTime": "2025-01-08T00:00:00.000000-04:00",
"endDateTime": "2025-02-07T00:00:00.000000-04:00"
},
"partyAccount": {
"id": "S-09122024",
"@type": "SubscriptionRef"
},
"logicalResource": [
{
"name": "AccessNumber",
"value": "09122024",
"@type": "MSISDN"
}
],
"product": [
{
"id": "94",
"name": "Prepaid_Template_Shared",
"@type": "CatalogRef"
}
]
}
]
Definitions
Each of the request parameters is detailed.
name | type | description | required |
---|---|---|---|
id | string | Resource ID of balance instance. | N |
name | string | Name of balance template as defined in My MATRIXX. | N |
@type | string | Bucket type (BalanceClassName), like 'MainBalance, MMS, Voice, Data, etc..' | N |
@baseType | base type | N | |
description | Class name of balance as defined in pricing file. Eg: United States dollar, Voice, Text, Data, etc.. | N | |
usageType | string | TMF enum values based on Balance Class Name from Matrixx Eg: monetary, voice, sms, data, other If 'IsMainBalance' is True then 'monetory' if 'BalanceClassName' from Matrixx is other than "voice, sms & data" then mapping 'other' | N |
isShared | boolean | Type of balance wallet owner. values: 1=Subscriber, 2=Group" | N |
remainingValue | object | A quantity (Quantity). Indicate the amount on the bucket. | N |
remainingValue.amount | number | Current balance amount. May not be accurate. | N |
remainingValue.units | string | Unit | N |
validFor | Object | A time period. productTerm validity period | N |
validFor.endDateTime | datetime | End time of the balance. For a periodic or on-demand balance, it is the end time of the period. For a simple balance, it is the end validity time of the balance.", | N |
validFor.startDateTime | datetime | Start time of the balance. For a periodic or on-demand balance, it is the start time of the period. For a simple balance, it is the start validity time of the balance.", | N |
relatedParty | array | A list of related parties | N |
relatedParty.id | string | External ID of balance owner. | N |
relatedParty.@type | string | Reference of Subscription | N |
logicalResource | array | logical resource | N |
logicalResource.name | string | Public identifier value of a product | N |
logicalResource.value | string | Public identifier type value | N |
logicalResource.@type | string | Reference of Public identifier, like MSISDN. | N |
product | array | A list of product references | N |
product.id | string | Pricing object ID of catalog item, if applicable | N |
product.name | string | External ID of catalog item, if applicable. | N |
product.@type | string | Reference of catalog | N |
taxItem | array | Look below taxItem values for more details | N |
taxItem.taxCategory | string | tax Category | N |
taxItem.@type | string | tax type | N |
taxItem.taxAmount | object | A money (Money). Tax applied. | N |
taxItem.taxAmount.value | float | Amount of balance update | N |
taxItem.taxAmount.unit | string | unit | N |
impactedAmount | object | Impacted Amount | N |
impactedAmount.amount | float | this is an Impact amount for Next Recharge if the customer will be on existing plan. | N |
impactedAmount.units | string | Currency (ISO4217 norm uses 3 letters to define the currency) | N |
taxItem Values
Name | Description | Sample |
---|---|---|
CITY SALES TAX | Tax name (set for tax related UpdateType only) | { "taxAmount": { "unit": "USD", "value": 0.3 }, "taxCategory": "CITY SALES TAX", "@type": "TaxItem" }, |
STATE SALES TAX | Tax name (set for tax related UpdateType only) | { "taxAmount": { "unit": "USD", "value": 0.0 }, "taxCategory": "FEDERAL COST RECOVERY FEE", "@type": "TaxItem" }, |
PR 911 SERVICE CHARGE | Tax name (set for tax related UpdateType only) | { "taxAmount": { "unit": "USD", "value": 0.5 }, "taxCategory": "PR 911 SERVICE CHARGE", "@type": "TaxItem" }, |
FEDERAL COST RECOVERY FEE | Tax name (set for tax related UpdateType only) | { "taxAmount": { "unit": "USD", "value": 0.0 }, "taxCategory": "FEDERAL COST RECOVERY FEE", "@type": "TaxItem" }, |
PUERTO RICO REGULATORY FEE | Tax name (set for tax related UpdateType only) | { "taxAmount": { "unit": "USD", "value": 0.0 }, "taxCategory": "PUERTO RICO REGULATORY FEE", "@type": "TaxItem" }, |
PR UNIVERSAL SERVICE FUND | Tax name (set for tax related UpdateType only) | { "taxAmount": { "unit": "USD", "value": 0.27 }, "taxCategory": "PR UNIVERSAL SERVICE FUND", "@type": "TaxItem" }, |
FEDERAL COST RECOVERY CHARGE | Tax name (set for tax related UpdateType only) | { "taxAmount": { "unit": "USD", "value": 0.0 }, "taxCategory": "FEDERAL COST RECOVERY CHARGE", "@type": "TaxItem" } |
FEDERAL UNIVERSAL SERVICE FUND | Tax name (set for tax related UpdateType only) | { "taxAmount": { "unit": "USD", "value": 0.45 }, "taxCategory": "FEDERAL UNIVERSAL SERVICE FUND", "@type": "TaxItem" }, |
Possible response error
In this section all the possible data structures received by the client are defined and that must be considered as unsatisfactory when responding to the method.
[ 400 ]
Bad Request - the request could not be understood by the server due to malformed syntax. The client SHOULD NOT repeat the request without modifications.
{
"errors" : [{
"code" : 400 ,
"message" : "The request is invalid or not properly formed.",
"description" : "Bad request"
}
]
}
[ 401 ]
Unauthorized - The request has not been applied because it lacks valid authentication credentials for the target resource.
{
"errors" : [{
"code" : 401 ,
"message" : "The user could not be authenticated for this request.",
"description" : "The request has not been applied because it lacks valid authentication credentials for the target resource"
}
]
}
[ 404 ]
Not Found - server has not found a resource with that URI. This may be temporary and permanent condition. This status code is commonly used when the server does not wish to reveal exactly why the request has been refused, or when no other response is applicable.
{
"errors" : [{
"code" : 404,
"message" : "The request is invalid or not properly formed.",
"description" : "The requested operation failed because a resource associated with the request could not be found."
}
]
}
[ 405 ]
Method Not Allowed - HTTP method not allowed for this resource. The method specified in the Request-Line is not allowed for the resource identified by the Request-URI.
{
"errors": [{
"code": 405,
"message": "APIKIT:METHOD_NOT_ALLOWED",
"description": "HTTP Method post not allowed for : /{businessId}/billingAccount/{id}"
}]
}
[ 429 ]
Too Many Requests - client has sent too many requests in a space of time (rate limiting). When a server is under attack or just receiving a very large number of requests from a single party, responding to each with a 429 status code will consume resources. Therefore, servers may drop connections or take other steps instead of responding with the 429 status code, when limiting resource usage.
{
"errors" : [{
"code" : 429,
"message" : "The request is invalid or not properly formed.",
"description" : "The requested operation failed because a resource associated with the request could not be found."
}
]
}
[ 500 ]
Internal Server Error - server encountered an error processing request. This should not happen normally, but it is a generic error message, given when no more specific message is suitable.
{
"errors" : [{
"code" : 500,
"message" : "The request failed due to an internal error.",
"description": ""
}
]
}
[ 501]
{
"errors":[
{
"code":501,
"message":"Not implemented",
"description":"Operation GET /billingAccount/{id} for Business Id: XXXX not implemented"
}
]
}
[ 503 ]
Service Unavailable - temporary maintenance of service, try again later. The implication is that this is a temporary condition which will be alleviated after some delay. If known, the length of the delay will be indicated in a Retry-After header. If no Retry-After is given, the client SHOULD handle the response as it would for a 500 response. Note: The existence of the 503 status code does not imply that a server will use it when becoming overloaded. Servers may simply refuse the connection.